package com.my.study.s3.config;

import com.my.study.s3.bean.S3Bean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: yidujun
 * @create: 2021/08/19 15:34
 */
@Configuration
public class S3Config {

    @Bean
    public S3BeanFactory s0() {
        S3BeanFactory s3BeanFactory = new S3BeanFactory();
        S3Bean bean = new S3Bean("s0", "ak0", "sk0");
        s3BeanFactory.setS3Bean(bean);
        return s3BeanFactory;
    }

    @Bean
    public S3BeanFactory s1() {
        S3BeanFactory s3BeanFactory = new S3BeanFactory();
        S3Bean bean = new S3Bean("s1", "ak1", "sk1");
        s3BeanFactory.setS3Bean(bean);
        return s3BeanFactory;
    }

    @Bean
    public S3BeanFactory s2() {
        S3BeanFactory s3BeanFactory = new S3BeanFactory();
        S3Bean bean = new S3Bean("s2", "ak2", "sk2");
        s3BeanFactory.setS3Bean(bean);
        return s3BeanFactory;
    }
}
